package com.slz3.business.module.configManagement.conShareManage.domain;

import lombok.AllArgsConstructor;

/**
 * @author Created By LiJie at 2018/11/23
 */

@AllArgsConstructor
public enum ShareType {
    /**
     * 分享类型 活动、商品、文章
     */
    GOODS("商品",0),

    ACTIVITY("活动",1),

    ARTICLE("文章",2);

    private String type;
    private Integer flag;

    public static ShareType getByKey(String key){
        for(ShareType tmp: ShareType.values()){
            if(tmp.flag.equals(key)){
                return tmp;
            }
        }
        return null;
    }
}
